<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //模板字符串`asdfasdfasdfas12312312${variableName}123123123${variableName}123123${variableName}`
        let name="张三";
        let hobbies = ["打篮球","踢足球","跳街舞"];

        let info = name+"的爱好有:"+hobbies[0]+"、"+hobbies[1]+"、"+hobbies[2];
        
        //模板字符串使得字符串拼接更加方便
        let infos = `${name}的爱好有:${hobbies[0]}、${hobbies[1]}、${hobbies[2]}`
        
        console.log(info);
        console.log(info);
    </script>
</body>
</html>